# 先处理源文件子目录
# subdir('haslib')
# subdir('drvlib')

devmon_srcs = [
  #'device_topo.cpp'
  'devmon.cpp',
  'utils.cpp',
  'device/csr.cpp',
  'device/driver.cpp',
  'device/manager.cpp',
  'topology/device_topo.cpp',
  'topology/topology_discovery.cpp',
  'discovery/root_interface.cpp',
  'discovery/root_object.cpp',
  'discovery/object_group.cpp',
  'discovery/object_group_interface.cpp',
  'discovery/app_schema.cpp',
  'discovery/csr_parser.cpp',
  'discovery/csr_utils.cpp',
]

devmon_lib = static_library(
  'libdevmon',
  devmon_srcs,
  include_directories: include_dirs,
  dependencies: [libmcpp_deps, internal_dep],
  install: false,
)

devmon_dep = declare_dependency(
  include_directories: include_dirs,
  link_with: devmon_lib,
  dependencies: [libmcpp_deps, internal_dep],
)

executable(
  'devmon',
  sources: [
    'main.cpp',
  ],
  dependencies: [devmon_dep],
  install: true,
  install_dir: install_dir + 'opt/bmc/apps/devmon',
)